package com.jdeng.dubbo.client;

import com.jdeng.api.GoodsService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class ClientApplication {

    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("spring-consumer.xml");
        GoodsService goodService = context.getBean(GoodsService.class);
        while (System.in.read() != 'q') {
            try {
                System.out.println(goodService.getGoods(1111));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
